don't 'g_tohl (*istream++)', but move pointer increment out of the macro,
authorHans Breuer <hans@breuer.org>
Fri, 20 Jul 2001 17:34:08 +0000 (17:34 +0000)
committerHans Breuer <hans@src.gnome.org>
Fri, 20 Jul 2001 17:34:08 +0000 (17:34 +0000)
2001-07-20  Hans Breuer  <hans@breuer.org>

* gdk-pixdata.c : don't 'g_tohl (*istream++)', but move
pointer increment out of the macro, because  at least one
compiler (msvc 5.0) gets confused otherwise (applies the
wrong increment).

* gdk_pixbuf.def : updated exports

* makefile.msc : reflect gdk-pixbuf-csource changes

gdk-pixbuf/ChangeLog
gdk-pixbuf/gdk-pixdata.c
gdk-pixbuf/gdk_pixbuf.def
gdk-pixbuf/makefile.msc

index 16e788ac14d2aa2f171c5b477b6fd0134895e84c..7de4cb61a566a0ba7a00a0fa8dd6f8f31ef41f01 100644 (file)
@@ -1,3 +1,14 @@
+2001-07-20  Hans Breuer  <hans@breuer.org>
+
+       * gdk-pixdata.c : don't 'g_tohl (*istream++)', but move
+       pointer increment out of the macro, because  at least one
+       compiler (msvc 5.0) gets confused otherwise (applies the
+       wrong increment).
+
+       * gdk_pixbuf.def : updated exports
+
+       * makefile.msc : reflect gdk-pixbuf-csource changes
 2001-07-17  Darin Adler  <darin@bentspoon.com>
 
        * gdk-pixbuf-csource.c: Add missing <stdlib.h> include.
index 152a2de106adccedffddf8a65f5fd79ed6ab8941..77040bdc04667491744bd479b7130d36b1ed32c7 100644 (file)
@@ -192,14 +192,20 @@ gdk_pixdata_deserialize (GdkPixdata   *pixdata,
 
   /* deserialize header */
   istream = (guint32*) stream;
-  pixdata->magic = g_ntohl (*istream++);
-  pixdata->length = g_ntohl (*istream++);
+  /*
+   * the deserialization of GdkPixdata will fail (at least on win32 with msvc 5.0) 
+   * with 'g_ntohl(*istream++)' because the guint32 istream pointer is only 
+   * incremented by 1 byte, if it is done within the g_ntohl() macro.
+   * Probably working around just another compiler bug ... --HB
+   */
+  pixdata->magic = g_ntohl (*istream); istream++;
+  pixdata->length = g_ntohl (*istream); istream++;
   if (pixdata->magic != GDK_PIXBUF_MAGIC_NUMBER || pixdata->length < GDK_PIXDATA_HEADER_LENGTH)
     return_header_corrupt (error);
-  pixdata->pixdata_type = g_ntohl (*istream++);
-  pixdata->rowstride = g_ntohl (*istream++);
-  pixdata->width = g_ntohl (*istream++);
-  pixdata->height = g_ntohl (*istream++);
+  pixdata->pixdata_type = g_ntohl (*istream); istream++;
+  pixdata->rowstride = g_ntohl (*istream); istream++;
+  pixdata->width = g_ntohl (*istream); istream++;
+  pixdata->height = g_ntohl (*istream);  istream++;
   if (pixdata->width < 1 || pixdata->height < 1 ||
       pixdata->rowstride < pixdata->width)
     return_header_corrupt (error);
index a654c474d5633245369a2fa8d239550c594fe436..7d2495b2ce3ca8a3749c45c4921975be18c93ce9 100644 (file)
@@ -12,6 +12,8 @@ EXPORTS
        gdk_pixbuf_animation_iter_advance
        gdk_pixbuf_animation_iter_get_delay_time
        gdk_pixbuf_animation_iter_get_pixbuf
+       gdk_pixbuf_animation_iter_get_type
+       gdk_pixbuf_animation_iter_on_currently_loading_frame
        gdk_pixbuf_animation_new_from_file
        gdk_pixbuf_animation_ref
        gdk_pixbuf_animation_unref
@@ -21,6 +23,8 @@ EXPORTS
        gdk_pixbuf_copy
        gdk_pixbuf_copy_area
        gdk_pixbuf_error_quark
+       gdk_pixbuf_fill
+       gdk_pixbuf_from_pixdata
        gdk_pixbuf_get_bits_per_sample
        gdk_pixbuf_get_colorspace
        gdk_pixbuf_get_has_alpha
@@ -30,16 +34,29 @@ EXPORTS
        gdk_pixbuf_get_rowstride
        gdk_pixbuf_get_type
        gdk_pixbuf_get_width
+       gdk_pixbuf_loader_close
+       gdk_pixbuf_loader_get_animation
+       gdk_pixbuf_loader_get_pixbuf
+       gdk_pixbuf_loader_get_type
+       gdk_pixbuf_loader_new
+       gdk_pixbuf_loader_new_with_type
+       gdk_pixbuf_loader_write
        gdk_pixbuf_new
        gdk_pixbuf_new_from_data
        gdk_pixbuf_new_from_file
-       gdk_pixbuf_new_from_inline
+       gdk_pixbuf_new_from_stream
        gdk_pixbuf_new_from_xpm_data
        gdk_pixbuf_new_subpixbuf
        gdk_pixbuf_ref
+;      gdk_pixbuf_rotate
        gdk_pixbuf_saturate_and_pixelate
        gdk_pixbuf_save
        gdk_pixbuf_savev
        gdk_pixbuf_scale
        gdk_pixbuf_scale_simple
        gdk_pixbuf_unref
+       gdk_pixdata_deserialize
+       gdk_pixdata_from_pixbuf
+       gdk_pixdata_serialize
+       gdk_pixdata_to_csource
+
index 2685e45f29b8664c8c04ded384a78a6ab2809733..ca11da023149e64a68e2e9727d3c0c00acead564 100644 (file)
@@ -18,8 +18,9 @@ PKG_CFLAGS = -I. -I.. $(GLIB_CFLAGS) \
 
 
 PKG_LINK = $(GLIB_LIBS) \
-       $(JPEG_LIBS) $(PNG_LIBS) $(TIFF_LIBS) $(INTL_LIBS) \
-       pixops\pixops.lib
+#      $(TIFF_LIBS) \
+       $(JPEG_LIBS) $(PNG_LIBS) $(INTL_LIBS) \
+       pixops\pixops.lib \
  
 OBJECTS = \
        gdk-pixbuf-animation.obj \
@@ -29,14 +30,16 @@ OBJECTS = \
        gdk-pixbuf-scale.obj \
        gdk-pixbuf-util.obj \
        gdk-pixbuf.obj \
+       gdk-pixdata.obj \
        io-bmp.obj \
        io-wbmp.obj \
        io-gif.obj \
+       io-gif-animation.obj \
        io-ico.obj \
        io-png.obj \
        io-pnm.obj \
        io-ras.obj \
-       io-tiff.obj \
+#      io-tiff.obj \
        io-xpm.obj \
        io-jpeg.obj \
 
@@ -49,7 +52,7 @@ gdk-pixbuf-marshal.c: gdk-pixbuf-marshal.list
 ## common stuff
 
 # cl -? describes the options
-CC = cl -G5 -GF $(OPTIMIZE) -W3 -nologo
+CC = cl -G5 -GF $(OPTIMIZE) $(CRUNTIME) -W3 -nologo
 
 # No general LDFLAGS needed
 LDFLAGS = /link $(LINKDEBUG)
@@ -63,7 +66,8 @@ all : \
        gdk-pixbuf-marshal.c \
        gdk-pixbuf-marshal.h \
        $(PACKAGE)-$(PKG_VER).dll \
-       make-inline-pixbuf.exe \
+#      make-inline-pixbuf.exe \
+       gdk-pixbuf-csource.exe \
        test-gdk-pixbuf.exe
 
 $(PACKAGE).lib : $(OBJECTS)
@@ -75,6 +79,9 @@ $(PACKAGE)-$(PKG_VER).dll : $(OBJECTS) $(PACKAGE).def
 make-inline-pixbuf.exe : make-inline-pixbuf.c
        $(CC) $(PKG_CFLAGS) -Femake-inline-pixbuf.exe make-inline-pixbuf.c $(PKG_LINK) $(PACKAGE)-$(PKG_VER).lib
 
+gdk-pixbuf-csource.exe : gdk-pixbuf-csource.c
+       $(CC) $(PKG_CFLAGS) -Fegdk-pixbuf-csource.exe gdk-pixbuf-csource.c $(PKG_LINK) $(PACKAGE)-$(PKG_VER).lib
+
 test-gdk-pixbuf.exe : test-gdk-pixbuf.c
        $(CC) $(PKG_CFLAGS) -Fetest-gdk-pixbuf.exe test-gdk-pixbuf.c $(PKG_LINK) $(PACKAGE)-$(PKG_VER).lib